package cc.sends;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @ Description : Main
 * @ Author : ChristosC
 * @ Date : 2020/12/15 16:31
 */
public class Main {
    public static void main(String[] args){
        List<Track> tracks = new ArrayList();
        Track currTrack = new Track(100);
        Scanner scanner = new Scanner(System.in);
        int[] track = {55,58,39,18,90,160,150,38,184};
        for (int i = 0;i<track.length; i++){
            tracks.add(new Track(track[i]));
        }

        System.out.println("Choose An Algorithm: 1 for FCFS, 2 for SSTF, 3 for SCAN and 4 for CSCAN");
        int algorithm = scanner.nextInt();
        switch (algorithm){
            case 1:
                FCFS fcfs = new FCFS();
                fcfs.init(tracks,currTrack);
                fcfs.start();
                break;
            case 2:
                SSTF sstf = new SSTF();
                sstf.init(tracks,currTrack);
                sstf.start();
                break;
            case 3 :
                SCAN scan = new SCAN();
                scan.init(tracks,currTrack);
                scan.start();
                break;
            case 4:
                CSCAN cscan = new CSCAN();
                cscan.init(tracks,currTrack);
                cscan.start();
                break;
        }
    }

}
